<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@page import="com.UU.J2EE.PizzaStore.beans.CustomerBean"%>
<%@page import="com.UU.J2EE.PizzaStore.dao.CustomerDAO"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'UpdateInfo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="js/register.js"></script>

  </head>
  
  <body>
    <%
	CustomerBean customerBean = new CustomerBean();
	customerBean.setName(request.getParameter("username"));
	if(!CustomerDAO.testCustomer(customerBean))
	{out.print("error");}
 	%>
	<font size=3>Update Infomation</font><br />
	<form action="UpdateInfoServlet" method="post" onsubmit="return CheckRegister()">
	Username:<input type="text" readonly id="Username" name="Username" value=<%=customerBean.getName()%>></input><br />
 	Password:<input type="password" id="Password" name="Password" value=<%=customerBean.getPassword() %>></input><br />
 	Email:<input type="text" id="Email" name="Email" value=<%=customerBean.getEmail() %>></input><br />
 	Phone:<input type="text" id="Phone" name="Phone" value=<%=customerBean.getPhone() %>></input><br />
 	Address:<input type="text" id="Address" name="Address" value=<%=customerBean.getAddress() %>></input><br />
	<input type="submit" name="submit" onclick="return CheckRegister()" ></input> <br />
	</form>	
	
  </body>
</html>
